package hk.com.fwd.maintest;

import hk.com.fwd.entity.InputArg;
import hk.com.fwd.util.GeneratorUtil;


/**
 * Created by lianghm.ext on 2019/10/14.
 */
public class TestGenerator {

    //public final static String  dbType="MYSQL";

    public final static String  dbType="SQLSERVER";


    public static void main(String args[])throws Exception{

        // hk fwd
        InputArg inputArg=new InputArg( "sqlFileName",  "tableName",  "removeSubStr", "modelName",  "packageName","dBName","functionId","pageName","dbAlias","pageDir");
        inputArg.setSqlFileName("script.sql");
        inputArg.setPackageName("hk.com.fwd");
        inputArg.setModelName("AgentMovementRpt");
        inputArg.setTableName("cam_agent_mov_history");
        inputArg.setRemoveSubStr("camamh_");
        inputArg.setdBName("INGCAMD301");
        inputArg.setFunctionId("MVR001");
        inputArg.setPageName("MVR001");
        inputArg.setDbAlias("##ACS##..");
        inputArg.setPageDir("report");


/*        InputArg inputArg=new InputArg( "sqlFileName",  "tableName",  "removeSubStr", "modelName",  "packageName","dBName","functionId","pageName","dbAlias");
        inputArg.setSqlFileName("script.sql");
        inputArg.setPackageName("com.winter.hui");
        inputArg.setModelName("Original");
        inputArg.setTableName("t_original");
        inputArg.setRemoveSubStr("hui_");
        inputArg.setdBName("db_hui");
        inputArg.setFunctionId("original");
        inputArg.setPageName("ORIGINAL001");
        inputArg.setDbAlias("db_hui.");*/

 /*       InputArg inputArg=new InputArg( "sqlFileName",  "tableName",  "removeSubStr", "modelName",  "packageName","dBName","functionId","pageName","dbAlias");
        inputArg.setSqlFileName("script.sql");
        inputArg.setPackageName("hk.com.fwd");
        inputArg.setModelName("User");
        inputArg.setTableName("t_user");
        inputArg.setRemoveSubStr("");
        inputArg.setdBName("db_hui");
        inputArg.setFunctionId("USR001");
        inputArg.setPageName("USR001");
        inputArg.setDbAlias("db_hui.");*/

        GeneratorUtil.mapper_generator(inputArg);
        GeneratorUtil.model_generator(inputArg);
        GeneratorUtil.modelDTO_generator(inputArg);
        GeneratorUtil.dao_generator(inputArg);
        GeneratorUtil.assembler_generator(inputArg);
        GeneratorUtil.bo_generator(inputArg);
        GeneratorUtil.controller_generator(inputArg);
        GeneratorUtil.restcontroller_generator(inputArg);
        GeneratorUtil.page_generator(inputArg);
        GeneratorUtil.page_generator2(inputArg);

    }


}
